package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.PubManageMapper;
import com.example.pojo.Pub;
import com.example.service.PubManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PubManageServiceImpl extends ServiceImpl<PubManageMapper, Pub> implements PubManageService {
    @Autowired
    private PubManageMapper pubManageMapper;

    @Override
    public List<Pub> selectAllPubManage(String brand, Integer start, Integer pageSize) {
        return pubManageMapper.selectAllPubManage(brand, start, pageSize);
    }

    @Override
    public int count(String brand) {
        return pubManageMapper.count(brand);
    }

    @Override
    public int deletePubManage(Integer id) {
        return pubManageMapper.deleteById(id);
    }

    @Override
    public int updatePubManage(Pub pub) {
        return pubManageMapper.updatePubManage(pub);
    }

    @Override
    public int addPubManage(Pub pub) {
        return pubManageMapper.addPubManage(pub);
    }

    @Override
    public Pub selectPubManageById(Integer id) {
        return pubManageMapper.selectPubManageById(id);


    }
}
